<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

class Role_power extends Model
{
	/**
	 * @content 角色--权限
	 * @author  *****
     */

	public $table = 'role_power';

    
	/**
	 * @content 查看单一角色所具有的权限
	 * @author   *****
	 */

	 public function onePower($r_id)
	 {
         
		 $str=$this->join('power','power.p_id','=','role_power.p_id')
				        ->where('role_power.r_id',$r_id)
				        ->get()
				        ->toArray();
		 return $str;
	 
	 }

}
	 
	
?>